A document is a set of information that is designed and presented as an individual entity and is recorded or stored in a physical storage medium (e.g., an electronic memory device or a print medium, such as paper). A structured document is formed of displayable elements (e.g., text, images, audio, and video) whose presentations are related to one another. The elements typically are related to one another in terms of their layout and relative location within the document. Document elements may be formed from lower-level elements. For example, texts typically are formed from words, sentences, and paragraphs. Images typically are formed from different layers (e.g., foreground and background) and different areas. Audio and video typically are formed from temporally and hierarchically arranged units and sequences of audio and video content, respectively.
The logical structure or semantics of a structured document can be described using a markup language, such as the standard generated markup language (SGML), the extensible markup language (XML), and a hypertext markup language (HTML). A markup language description of a document typically includes a set of tags that delimit and label discrete elements of the document. In XML, for example, a tag is a keyword that identifies the beginning and ending points of its associated element. Markup language tags typically have a distinct syntax that distinguishes them from the elements that they surround. The tag syntax allows a parser to recognize the tag. A structured document can be presented by any tool (e.g., a web browser) that is capable of interpreting the markup language description of the document. In some cases, one or more style sheets (e.g., cascading style sheets (CSS)) can be attached to the logical structure of the document to produce different respective presentations.
In many cases, a structured document presentation that is designed for one application environment is not suitable or at least not optimized for another application environment. For example, web pages typically are ill-formatted for printing. As a result, users typically consume more resources (e.g., ink and paper) than needed when they print entire web pages that contain contents, such as advertisements, headers, footers, center column, and large margin design features, which are not of interest to the users.